import com.java.Student;
import com.java.UConfig;
import com.java.User;
import com.java.model.ArticleInfo;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        //1.得到容器对象
        ApplicationContext context =
                new ClassPathXmlApplicationContext("spring-config.xml");
        //2.得到 Bean 对象
//        User user = context.getBean("user",User.class);
//        Student student = context.getBean("student",Student.class);
//        UConfig uConfig = context.getBean("UConfig",UConfig.class);
        ArticleInfo articleInfo = context.getBean("getArt",ArticleInfo.class);

        //3.使用 Bean
//        user.sayHi();
//        student.sayHi();
//        uConfig.sayHi();
        System.out.println(articleInfo.toString());

    }
}
